package org.montecristo.posmobile.rastreo;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.location.Criteria;
import android.location.LocationManager;

public class ShutDownReciver extends BroadcastReceiver {


	@Override
	public void onReceive(Context context, Intent intent) {
    LocationManager lm= (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
     	Criteria c = new Criteria();
    	c.setAccuracy(Criteria.ACCURACY_FINE);	    
    	c.setAltitudeRequired(false);
    	c.setBearingRequired(false);
    	c.setCostAllowed(true);
    	c.setPowerRequirement(Criteria.POWER_HIGH);
    	String bestProvider = lm.getBestProvider(c, true);
        lm.requestLocationUpdates(bestProvider,0, 0,new Localizacion(context, 2));					
	}
	

}
